package com.estronger.shopmanage.bean;

import android.support.annotation.NonNull;

public class GridItemBean implements Comparable<GridItemBean> {

    private int _id;
    private String ctext;
    private int img_id;//没有数量时的图片
    private int img_id2;//有数了时的图片
    private int number;
    private Class m_class;

    public GridItemBean(int _id, String ctext, int img_id, int img_id2, Class m_class, int number) {
        this._id = _id;
        this.ctext = ctext;
        this.img_id = img_id;
        this.img_id2 = img_id2;
        this.m_class = m_class;
        this.number = number;
    }

    public int get_id() {
        return _id;
    }

    public void set_id(int _id) {
        this._id = _id;
    }

    public String getCtext() {
        return ctext==null?"":ctext;
    }

    public void setCtext(String ctext) {
        this.ctext = ctext;
    }

    public int getImg_id() {
        return img_id;
    }

    public void setImg_id(int img_id) {
        this.img_id = img_id;
    }

    public int getImg_id2() {
        return img_id2;
    }

    public void setImg_id2(int img_id2) {
        this.img_id2 = img_id2;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public Class getM_class() {
        return m_class;
    }

    public void setM_class(Class m_class) {
        this.m_class = m_class;
    }

    @Override
    public int compareTo(@NonNull GridItemBean gridItemBean) {
        if (this._id >= gridItemBean.get_id()) {
            return 1;
        }
        return -1;
    }
}